import java.util.Arrays;

public class Solution1742 {
    public int countBalls(int lowLimit, int highLimit) {
        int[] f=new int[100];
        for (int i=lowLimit;i<=highLimit;i++){
            int t=0;
            for (char c : String.valueOf(i).toCharArray()) {
                t+=c-'0';
            }
            f[t]++;
        }
        return Arrays.stream(f).max().getAsInt();
    }

    public static void main(String[] args) {
        System.out.println(new Solution1742().countBalls(1,10));
    }
}
